package com.mright.shop.manager.common.constant;

import java.io.Serializable;

/**
 * @author : zhaochuanzhen
 * @description :
 * @date : 2020/7/29 15:27
 */
public class RespBean implements Serializable {

    private Integer status;
    private String msg;
    private Object obj;

    public static RespBean error(String msg) {
        RespBean result = new RespBean();
        result.status = 500;
        result.msg = msg;
        return result;
    }

    public static RespBean ok(String msg) {
        return ok(msg, null);
    }

    public static RespBean ok(String msg, Object obj) {
        RespBean result = new RespBean();
        result.status = 200;
        result.msg = msg;
        result.obj = obj;
        return result;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }
}
